<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>我的</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<link rel="stylesheet" href="../../plugins/mui/mui.min.css">
	<script src="../../js/statistics.js"></script>
	<style type="text/css">
		* {
			box-sizing: border-box;
			font-family: 'Microsoft YaHei';

		}
		body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, input, p, table, th, td, select, option {
			padding: 0;
			margin: 0;
			list-style: none;
		}
		body {}
		/*title的样式覆盖*/
		.mui-bar {
			background-color: #2a2c33;
		}
		.mui-title {
			color: #fff;
		}
		/*列表数字角标移动防止盖住右箭头*/
		.mui-table-view-cell>.mui-badge {
			right: 10.6%;
		}
		.mui-table-view:not(:last-child) {
			border-bottom: 10px solid #f1f1f1;
		}
		.mui-navigate-right {
			line-height: 22px;
			font-size: 15px;
		}
		.icon1 {
			width: 21px;
			height: 21px;
			float: left;
			margin-right: 2.66%;
			/*vertical-align: middle;*/
			display: block;
		}
		.mui-badge-red {
			background-color: #ef113a;
		}
		.icon2>li>a>img {
			width: 59px;
			height: 59px;
			margin-right: 7.4%;
		}
		.icon2>li>a {
			line-height: 59px;
			font-size: 16px;
		}
		.icon2>li>a>div {
			display: inline-block;
			line-height: 16px;
			float: left;
			margin-top: 11px;
		}
		.icon2>li>a>div>span {
			display: inline-block;
		}
		.icon2>li>a>div>span:last-child {
			color: #999;
			font-size: 14px;
			line-height: 14px;
		}
		.icon2>li>span {
			position: absolute;
			top: 50%;
			right: 13.3%;
			-webkit-transform: translateY(-50%);
			width: 26px;
			height: 26px;
			background: url('../../images/my/index/erweima_1.png') no-repeat center center;
			background-size: cover;
		}
		.mui-table-view:before {
			display: none;
		}
		.mui-table-view:after {
			display: none;
		}
		.mui-table-view-cell:after {
			background-color: #e5e5e5;
		}
		/*百分比优化*/
		.mui-table-view-cell {
			padding: 11px 12px;
		}
		.mui-table-view-cell>a:not(.mui-btn) {
			margin: -11px -4%;
		}
		.mui-navigate-right:after,
		.mui-push-right:after {
			right: 12px;
		}
		#user-nicheng {
			width:10px;
			height:25px;
			line-height: 25px;
			padding-right:20px;
			padding-left: 20px;
			background: url('') right center no-repeat;
			background-size:contain;
		}
		.man {
			background-image: url('../../images/my/index/man_1.png')!important;
		}
		.woman {
			background-image: url('../../images/my/index/woman_1.png')!important;
		}



		/*修改用户头像*/
		.icon3{
			width:100%;
			/*height:178px;*/
			/*margin-bottom:26px;*/
		}
		body{
			background: #fff;
		}
		.icon3>li:first-child{
			width:100vw;
			height:47.46vw;
			background: url("../../images/my/index/back_header.png") no-repeat;
			background-size: contain;
		}
		.icon3 li{
			padding:3.2vw 3.2vw 2.13vw 3.2vw;
			width:100%;
			text-align: center;
		}
		.user_li1{
			padding-top:11px;
		}
		.user_li1 p{
			display: inline-block;
			width:22px;
			height:22px;
		}
		.user_li1 p:first-child{
			float: left;
			background: url("") no-repeat;
			background-size: 100%;
		}
		.user_li1 p:last-child{
			float: right;
			background-image: url("../../images/my/index/setting.png");
			background-size: 100%;
			background-repeat: no-repeat;
		}
		.user_li1 p.new{
			background-image: url("../../images/my/index/setting-1.png");
		}
		.user_li1 p:last-child .icon-setting{
			position: relative;
			display: inline-block;
			width: 40px;
			height: 40px;
			top:-3vw;
			margin-left: -3.2vw;
		}
		.user_li1 img{
			/*width:29%;*/
			/*height:29%;*/

			width:100%;
			height:100%;

			box-shadow:0 0 5px rgba(124,124,124,.3) ;


			/*width:20px;
			height:20px;*/
			text-align: center;
			/*margin-top:14.3%;*/
			border-radius: 50%;
			/*position: relative;
   			 z-index: 100;*/

		}
		#imgM{
			width: 25.9vw;
			height: 25.9vw;
			background: transparent;
			margin-top:13.33vw;
		}
		.icon3 .user_li2{
			font-size:16px;
			color:#333;
			padding:0px;
		}
		/*.icon3 .user_li2 #sex1{
			display: inline-block;
			width:100px;
			height: 21px;
			background: url("") no-repeat;
			background-size: 100%;
			vertical-align: middle;
		}*/

		.man {
			background-image: url('../../images/my/index/man_1.png')!important;
		}
		.woman {
			background-image: url('../../images/my/index/woman_1.png')!important;
		}


		.icon3 .user_li3{
			color:#999;
			font-size:13px;
			padding-top:0px;
			text-align: center;
		}

		.icon3 .user_li3>span{
			padding-right: 55px;

		}
		.icon3 .user_li3>span.isreal{
			background: url("../../images/my/index/isreal.png") right center no-repeat;
			background-size: contain;
		}
		.icon3 .user_li3>span.unreal{
			background: url("../../images/my/index/unreal.png") right center no-repeat;
			background-size: contain;
		}
		/*最后===设置下划线*/
		.mui-table-view-cell:last-child:after{
			height:1px;
		}

		#authentication{
			padding:0 20px;
			background: url("../../images/my/index/isreal.png") center center no-repeat;
			background-size:contain;
			margin-top: -2px;
			margin-left: 5px;
		}
		.mui-navigate-right:after, .mui-push-right:after{
			font-size:18px;
			right:12px;
		}
	</style>
</head>

<body>
<!--<ul class="mui-table-view icon2">-->
<!--<li class="mui-table-view-cell">-->
<!--<a class="mui-navigate-right" id='user'>-->
<!--<img src="../../images/my/index/gray.png" alt="" class='icon1' id='mainImage'>-->
<!--<div>-->
<!--<span style='margin-bottom:5px;' id='user-nicheng'></span><br/>-->
<!--<span id='cg_username'>用户名：</span>-->
<!--</div>-->
<!--</a>-->
<!--<span id='erweima'></span>-->
<!--&lt;!&ndash;<span class="mui-badge mui-badge-red">11</span>&ndash;&gt;-->
<!--</li>-->
<!--</ul>-->
<ul class="icon3">
	<li class="user_li1">
		<p id="scan"></p>
		<p id='imgM'>
			<img src="../../images/my/index/gray.png" alt="" id='mainImage'>
		</p>
		<p><i class="icon-setting" id='seting'></i></p>
	</li>
	<li class="user_li2"><span id='user-nicheng'>********</span></li>
	<li class="user_li3" id='cg_username'><span>用户名：********</span></li>
</ul>


<ul class="mui-table-view icon4">
	<li class="mui-table-view-cell" id="score">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my1.png" alt="" class='icon1' /> 我的积分
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="news">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my2.png" alt="" class='icon1' /> 我的消息
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>


	<li class="mui-table-view-cell" id='comment1'>
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my3.png" alt="" class='icon1' /> 我评论的
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>

	<li class="mui-table-view-cell" id='appointment'>
		<a class="mui-navigate-right">
			<img src="../../images/icon/chineseHospital/appointment.png" alt="" class='icon1' />我的预约
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id='post1'>
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my4.png" alt="" class='icon1' />我的帖子
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="activity">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my5.png" alt="" class='icon1' /> 我的活动
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="favorite">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my6.png" alt="" class='icon1' /> 我的收藏
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>

</ul>

<ul class="mui-table-view">
	<li class="mui-table-view-cell" id="fund">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my7.png" alt="" class='icon1' /> 公积金
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="security">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my8.png" alt="" class='icon1' /> 社保
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="water">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my9.png" alt="" class='icon1' /> 水费
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="electricity">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my10.png" alt="" class='icon1' /> 电费
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="gas">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my11.png" alt="" class='icon1' /> 燃气费
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="drive">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my12.png" alt="" class='icon1' /> 驾照
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="car">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my13.png" alt="" class='icon1' /> 车辆
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="tv" data-href="http://weixinpay.js96296.com/wchat/info/toBankRecharge.jspx?accountId=3065">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my16.png" alt="" class='icon1' /> 有线电视费用查询
		</a>
	</li>
</ul>

<ul class="mui-table-view">
	<li class="mui-table-view-cell" id='feedback'>
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my14.png" alt="" class='icon1' /> 意见反馈
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>
	<li class="mui-table-view-cell" id="download1">
		<a class="mui-navigate-right">
			<img src="../../images/my/index/my15.png" alt="" class='icon1' /> 推荐下载
		</a>
		<!--<span class="mui-badge mui-badge-red">11</span>-->
	</li>

</ul>

<script src="../../plugins/jquery/jquery-3.1.0.min.js"></script>
<script src="../../plugins/mui/mui.min.js"></script>
<!--<script type="text/javascript" src="../plugins/mui/update.js"></script>-->
<script src="../../js/getApiToken.js"></script>
<script src="../../js/md5.js"></script>
<script type="text/javascript">
	mui.init({
//				statusBarBackground: '#43ac45', //ios下设置顶部背景色
	});
	mui.plusReady(function() {
		init();
		//初始震动跟铃声的状态,个人信息
		function init() {
			//初始震动跟铃声的状态
			if(!plus.storage.getItem('shake')) {
				plus.storage.setItem('shake', 'on');
				plus.storage.setItem('tinkle', 'on');
			} else {

			}
				var settingIcon = plus.storage.getItem('icon');
				if(settingIcon){	
					changeImg();
				}
				myAjax('home/water/info_new', 'get', {
					'userId': plus.storage.getItem('cg_user_id')
				}, function(data) {
					console.log(JSON.stringify(data));
					var water_code = data.data.water_code;
					var gas_yhbh = data.data.gas_yhbh;
					var spcode = data.data.spcode;
					if(water_code!=''){
						plus.storage.setItem('water_code', water_code);
					}else{
						plus.storage.removeItem('water_code');
					}
					if(gas_yhbh!=''){
						plus.storage.setItem('gas_yhbh', gas_yhbh);
					}else{
						plus.storage.removeItem('gas_yhbh');
					}
					if(spcode !=''){
						plus.storage.setItem('spcode', spcode);
					}else{
						plus.storage.removeItem('spcode');
					}
				});
				myAjax('personal/user_profile/getselfprofile', 'get', {
					'user_id': plus.storage.getItem('cg_user_id'),
					'user_token': plus.storage.getItem('cg_user_token')
				}, function(data) {
					if(!data.success){
						return ;//发生错误 就直接退出
					}
					console.log(JSON.stringify(data));
					//初始化头像

					//ios版本打开
//							plus.storage.setItem('cg_headimgurl', _baseUrl+data.data.headimgurl);
					//安卓打开下面
//					download(data.data.headimgurl);
					if(data.data.headimgurl.indexOf('http://') == -1 && data.data.headimgurl.indexOf('https://') == -1){
						var headImg = _baseUrl+data.data.headimgurl;
					}else{
						var headImg = data.data.headimgurl;
					}
					plus.storage.setItem('cg_headimgurl',headImg);
					//初始用户名
					plus.storage.setItem('cg_username', data.data.username+'');
					//初始用户名的性别
					plus.storage.setItem('cg_sex', data.data.sex+'');
					//初始昵称
					plus.storage.setItem('cg_nickname', data.data.nickname+'');
					//用户头像
//					plus.storage.setItem('cg_headimgurl', data.data.headimgurl+'');
					//初始化个性签名
					plus.storage.setItem('cg_signature', data.data.signature);
					//初始化二维码
					plus.storage.setItem('cg_qrcode', data.data.qrcode+'');
					//初始实名认证
					plus.storage.setItem('cg_certification', data.certification+'');
					console.log('data.certification'+data.certification);

					//初始化手机号码
					if(isNaN(data.data.mobile)){
						plus.storage.setItem('cg_mobile', '未绑定');
					}else{
						plus.storage.setItem('cg_mobile', data.data.mobile+'');
					}
					
					//初始化邮箱
					plus.storage.setItem('cg_email', data.data.email);
					//初始城市
					if(!data.data.city){
						plus.storage.setItem('cg_city', '320000|江苏省|320400|常州市');
					}else{
						plus.storage.setItem('cg_city', data.data.city);
					}
					//初始化地址	
					plus.storage.setItem('cg_address', data.data.address);
					//初始化完成
					set();

					console.log('cg_sex'+plus.storage.getItem('cg_sex'));



				});
			
		}
		//图片下载函数
//		function download(data){
//			if(data.indexOf('http://') == -1 && data.indexOf('https://') == -1){
//				var data_path = _baseUrl+data;
//			}else{
//				var data_path = data;
//			}
//			console.log(data_path);
//			plus.io.resolveLocalFileSystemURL("_doc/userImg/", function( entry ) {
//				// 可通过entry对象操作test.html文件
//				var directoryReader = entry.createReader();
//				directoryReader.readEntries( function( entries ){
//					for( var i=0; i < entries.length; i++ ) {
//						entries[i].remove();//遍历每个文件
//					}
//					var dtask = plus.downloader.createDownload(data_path, {filename:"_doc/userImg/"}, function(d,status){
//						if ( status == 200 ) {
//							plus.io.resolveLocalFileSystemURL(d.filename, function(entry) {
//								entry.file( function ( file ) {
//									plus.storage.setItem('cg_headimgurl', entry.toLocalURL());
//									$('#mainImage')[0].src=plus.storage.getItem('cg_headimgurl');
//								}, function ( e ) {
//									alert( e.message );
//								});
//							});
//						} else {
//							plus.nativeUI.alert("头像下载失败！");
//						}
//					});
//					dtask.start();
//				}, function(e){
//					alert( "Read entries failed: " + e.message );
//				} );
//			}, function ( e ) {
//				var dtask = plus.downloader.createDownload(_baseUrl+data_path, {filename:"_doc/userImg/"}, function(d,status){
//					if ( status == 200 ) {
////											console.log(d.filename);
//						plus.io.resolveLocalFileSystemURL(d.filename, function(entry) {
//							entry.file( function ( file ) {
//								plus.storage.setItem('cg_headimgurl', entry.toLocalURL());
//								$('#mainImage')[0].src=plus.storage.getItem('cg_headimgurl');
//
//
//							}, function ( e ) {
//								alert( e.message );
//							});
//						});
//					} else {
//						plus.nativeUI.alert("头像下载失败！");
//					}
//				});
//				dtask.start();
//			} );
//		}

		function set(){
			//设置头像
			var a=plus.storage.getItem('cg_headimgurl');
			console.log(a);
			if(a){
				$('#mainImage')[0].src=a;
			}else{
			}
			//设置昵称
			if(plus.storage.getItem('cg_nickname')){
				$('#user-nicheng').html(plus.storage.getItem('cg_nickname'));
			}
			//设置用户名
			if(plus.storage.getItem('cg_username')){
				$('#cg_username>span').html('用户名：'+plus.storage.getItem('cg_username'));
			}
			//设置实名认证
			if(plus.storage.getItem('cg_certification')==1){
				$('#cg_username>span').addClass('isreal');
			}else{
				$('#cg_username>span').addClass('unreal');

			}
			//设置性别
			if((plus.storage.getItem('cg_sex')==0)||(plus.storage.getItem('cg_sex')==1)){
				$('#user-nicheng').addClass('man');
			}else{
				$('#user-nicheng').addClass('woman');
			}
		}

		var seting = document.getElementById("seting");
		//监听点击事件
		seting.addEventListener("tap", function() {
			mui.openWindow({
				url: 'seting.html',
				id: 'seting.html',
				show: {
					autoShow: false, //页面loaded事件发生后自动显示，默认为true
					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			})
		});
		//个人信息
		var user = document.getElementById("mainImage");
		user.addEventListener("tap", function() {
			mui.openWindow({
				url: 'user-0.html',
				id: 'user-0.html',
				show: {
					autoShow: false, //页面loaded事件发生后自动显示，默认为true
					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			})
		});

		//设置
//		seting.addEventListener("tap", function() {
//			mui.openWindow({
//				url: 'seting.html',
//				id: 'seting.html',
//				show: {
//					autoShow: false, //页面loaded事件发生后自动显示，默认为true
//					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
//				},
//				waiting: {
//					title: '正在加载...' //等待对话框上显示的提示内容
//				}
//			})
//		});
		//设置
		download1.addEventListener("tap", function() {
			mui.openWindow({
				url: 'user-10.html',
				id: 'user-10.html',
				show: {
					autoShow: false, //页面loaded事件发生后自动显示，默认为true
					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			})
		});
		//我的预约
		appointment.addEventListener("tap", function() {
			mui.openWindow({
				url:'../chineseHospital/appointment.html',
				id:'appointment.html'
			})
		});
		//我的帖子
		post1.addEventListener("tap", function() {
			mui.openWindow({
				url: 'post-1.html',
				id: 'post-1.html',
				show: {
//					autoShow: false, //页面loaded事件发生后自动显示，默认为true
//					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			})
		});
		//我的收藏
		favorite.addEventListener("tap", function() {
			mui.openWindow({
				url: 'favorite-1.html',
				id: 'favorite-1.html',
				show: {
					autoShow: false, //页面loaded事件发生后自动显示，默认为true
					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			})
		});
		//我的评论
		comment1.addEventListener("tap", function() {
			mui.openWindow({
				url: 'comment-1.html',
				id: 'comment-1.html',
				show: {
					autoShow: false, //页面loaded事件发生后自动显示，默认为true
					duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				waiting: {
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			})
		});
		//动态接受数据进行处理
		window.addEventListener("pageflowrefresh", function(e) {
			//获得事件参数
			if(e.detail.userImg) {
				mui('#mainImage')[0].src = e.detail.userImg;
			} else if(e.detail.gender) {
				if(e.detail.gender==1){
					$('#user-nicheng').removeClass('man').removeClass('woman').addClass('man');
				}else{
					$('#user-nicheng').removeClass('man').removeClass('woman').addClass('woman');
				}
				if(plus.storage.getItem('cg_headimgurl')){
					$('#mainImage')[0].src=plus.storage.getItem('cg_headimgurl');
				}
			} else if(e.detail.userName) {
				mui('#user-nicheng')[0].innerHTML = e.detail.userName;
			}
		});
		window.addEventListener('certification',function(){
			set();
		});
		
		window.addEventListener('abortVersion',function(){
			changeImg('hide');
		});
		//我的消息
		mui('body').on('tap','#news',function(e){
			mui.openWindow({
				url:'news-1.html',
				id:'news-1',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		});
		//我的活动
		mui('body').on('tap','#activity',function(e){
			mui.openWindow({
				url:'activity-1.html',
				id:'activity-1',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		});

		//积分
		mui('body').on('tap','#score',function(e){
			mui.openWindow({
				url:'../exchange/index.html',
				id:'score',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					toSign:false,
					type:0
				}
			})
		});
		//公积金
		mui('body').on('tap','#fund',function(e){
			mui.openWindow({
				url:plus.storage.getItem('spcode')? 'fund.html':'fund-login.html',
				id:plus.storage.getItem('spcode')? 'fund.html':'fund-login.html',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					
				}
			})
		});
		//社保
		mui('body').on('tap','#security',function(e){
			mui.openWindow({
				url:'security.html',
				id:'security',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		});
		//水费
		mui('body').on('tap','#water',function(e){
			console.log('water_code'+plus.storage.getItem('water_code'));
			mui.openWindow({
				url:plus.storage.getItem('water_code')?'../life_housekeeper/user_water_list.html':'../life_housekeeper/user_water_default.html',
				id:plus.storage.getItem('water_code')?'user_water_list':'water',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		}); 
		//电费electricity
		mui('body').on('tap','#electricity',function(e){
			mui.openWindow({
				url:'../life_housekeeper/detail.html',
				id:'detail.html',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0,
					'link':'https://elewebapp.95598pay.com/livingpay/',
				    'title':'电费查询',
				    'isStorage':'pay_df'
				}
			})
		});
		//燃气费
		mui('body').on('tap','#gas',function(e){
			mui.openWindow({
				url:plus.storage.getItem('gas_yhbh')?'../life_housekeeper/gas_list.html':'../life_housekeeper/gas_default.html',
				id:plus.storage.getItem('gas_yhbh')?'gas_list':'gas_default',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					
				}
			})
		});
		//意见反馈
		mui('body').on('tap','#feedback',function(e){
			mui.openWindow({
				url:'seting-3.html',
				id:'feedback',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		});

		//驾照
		mui('body').on('tap','#drive',function(e){
			mui.openWindow({
				url:'drive-1.html',
				id:'drive-1',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		});
		//车辆
		mui('body').on('tap','#car',function(e){
			mui.openWindow({
				url:'car-1.html',
				id:'car-1',
				waiting:{
					autoShow:true,//自动显示等待框，默认为true
					title:'正在加载...',//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				},
				extras:{
					type:0
				}
			})
		});
		//有线电视费用查询
		mui('body').on('tap','#tv',function(e){
			var href = this.getAttribute('data-href');
			mui.openWindow({
				url:'../life_housekeeper/detail.html',
				id:'detail.html',
				extras:{
			    	'link':href,
				    'title':'有线电视查询'
					//自定义扩展参数，可以用来处理页面间传值
				},
				waiting:{
		      		autoShow:true,//自动显示等待框，默认为true
		      		title:'正在加载...'//等待对话框上显示的提示内容
				},
				show:{
					autoShow:true,
					aniShow:'fade-in'
				}
			})
		});
		
		//实名认证跳转
		mui('body').on('tap','#cg_username>span',function () {
			userTrueName()
		})
		function userTrueName(){
			var a=plus.storage.getItem('cg_certification');
			if(a==-1){
				mui.openWindow({
					url:'user-4-1.html',
					id:'user-4-1.html',
					show:{
						autoShow:true,//页面loaded事件发生后自动显示，默认为true
						duration:200//页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
					},
					waiting:{
						title:'正在加载...'//等待对话框上显示的提示内容
					},
					extras:{
						'name':name
					}
				})
			}else{
				mui.openWindow({
					url:'user-9.html',
					id:'user-9.html',
					show:{
						autoShow:false,//页面loaded事件发生后自动显示，默认为true
						duration:200//页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
					},
					waiting:{
						title:'正在加载...'//等待对话框上显示的提示内容
					},
					extras:{
						'name':name
					}
				})
			}

		}
		function changeImg(isShow){
			if(isShow == 'hide'){
				$("#seting").parent().removeClass('new');
				return;
			}
			$("#seting").parent().addClass('new');
		}
	});
</script>
</body>
</html>